package com.linxianqin.springbootVue.domain.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import java.util.List;

import com.linxianqin.springbootVue.domain.dto.SysDeptDTO;
import com.linxianqin.springbootVue.domain.dto.SysRoleDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 用户信息表
 * </p>
 *
 * @author lxq
 * @since 2020-12-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="SysUser对象", description="用户信息表")
public class SysUser implements Serializable {

    private static final long serialVersionUID=1L;

      @ApiModelProperty(value = "用户ID")
      @TableId(value = "user_id", type = IdType.ASSIGN_ID)
      private Long userId;

      @ApiModelProperty(value = "部门ID")
      private Long deptId;

      @ApiModelProperty(value = "用户账号")
      private String userName;

      @ApiModelProperty(value = "用户昵称")
      private String nickName;

      @ApiModelProperty(value = "用户类型（00系统用户）")
      private String userType;

      @ApiModelProperty(value = "用户邮箱")
      private String email;

      @ApiModelProperty(value = "手机号码")
      private String phonenumber;

      @ApiModelProperty(value = "用户性别（0男 1女 2未知）")
      private String sex;

      @ApiModelProperty(value = "头像地址")
      private String avatar;

      @ApiModelProperty(value = "密码")
      private String password;

      @ApiModelProperty(value = "帐号状态（0正常 1停用）")
      private String status;

      @ApiModelProperty(value = "最后登录IP")
      private String loginIp;

      @ApiModelProperty(value = "最后登录时间")
      private Date loginDate;

      @ApiModelProperty(value = "创建者")
      private String createBy;

      @ApiModelProperty(value = "创建时间")
      @TableField(fill = FieldFill.INSERT)
      private Date createTime;

      @ApiModelProperty(value = "更新者")
      private String updateBy;

      @ApiModelProperty(value = "更新时间")
      @TableField(fill = FieldFill.UPDATE)
      private Date updateTime;

      @ApiModelProperty(value = "备注")
      private String remark;

      @ApiModelProperty(value = "删除标志（0代表存在 1代表删除）")
      @TableField(fill = FieldFill.INSERT)
      @TableLogic
      private String deleted;

      @ApiModelProperty(value = "部门对象")
      @TableField(exist=false)
      private SysDept dept;

      @ApiModelProperty(value = "角色对象")
      @TableField(exist=false)
      private List<SysRole> roles;
}
